﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using FuelTracker.Resources;
using Caliburn.Micro;

namespace FuelTracker.Views
{
    public partial class FuelLogsView : PhoneApplicationPage
    {
        public FuelLogsView()
        {
            InitializeComponent();

            AppBarButton addButton = (AppBarButton)ApplicationBar.Buttons[1];
            addButton.Text = Texts.Lbl_Add;

            FuelLogsPivot.SelectionChanged += new SelectionChangedEventHandler(FuelLogsPivot_SelectionChanged);
        }

        void FuelLogsPivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ApplicationBar.IsVisible = ((PivotItem)FuelLogsPivot.SelectedItem).Name == "FuelLogsPivotPage";
        }

        
    }
}